toStream

suspend fun <ERROR CLASS><String>.toStream(scope: <ERROR CLASS> = GlobalScope): <ERROR CLASS>
suspend fun <ERROR CLASS><ByteArray>.toStream(scope: <ERROR CLASS> = GlobalScope): <ERROR CLASS>
suspend fun <ERROR CLASS><<ERROR CLASS>>.toStream(scope: <ERROR CLASS> = GlobalScope): <ERROR CLASS>

Convert a flow to a stream by writing the flow's elements to an internal.PassThrough.

Collects the flow in GlobalScope by default, eventually scope will become a context receiver.

TODO make scope a context receiver.